package common

type Feedback[T any] struct {
	Code    int    `json:"code"`
	Result  string `json:"result"`
	Message string `json:"message"`
}

func Succeed(message string) Feedback[any] {
	return Feedback[any]{Code: 200, Result: "success", Message: message}
}

func Failed(message string) Feedback[any] {
	return Feedback[any]{Code: 500, Result: "failure", Message: message}
}
